package dao;

import static org.junit.Assert.*;

import java.sql.Date;
import java.sql.SQLException;
import java.util.List;

import modele.Formateur;
import modele.Personne;

import org.junit.Test;

public class TestFormateurDAO  extends AgriotesDbTestCase {
	

	
	@Test
	public void inserer() throws SQLException{
		Formateur f= new Formateur(90, "Sam", "Sammy", Date.valueOf("1111-11-11"), "0102030405", "adresse", "12345", "ville", "mail@a.com", "pass123", "diplome", "presa", "photo");
		Formateur f2 = null;
		PersonneDAO pdao = new PersonneDAO();
		FormateurDAO dao = new FormateurDAO();
		dao.inserer(f);
		f2 = dao.lireParId(f.getIdPersonne());		
		assertEquals("Ca ne marche pas", f, f2);
	}

	
}
